package com.lagou;

import com.lagou.service.HelloService;

import java.util.ServiceLoader;

public class HelloServiceMain {

    public static void main(String[] args) {
        ServiceLoader<HelloService> serviceLoaders = ServiceLoader.load(HelloService.class);
        for (HelloService helloService : serviceLoaders) {
            System.out.println(helloService.getClass().getName() + ":" + helloService.sayHello());
        }
    }
}
